package edu.lingnan.house.controller;

import edu.lingnan.house.service.NewhouseService;
import edu.lingnan.house.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
@RequestMapping("/newHouse")
public class NewhouseController {
    @Autowired
    private NewhouseService newhouseService;
    //显示新房页面
    @ResponseBody
    @GetMapping("/selectNew")
    public Result selectNew(Integer minArea,Integer maxArea,Double minPrice,Double maxPrice,String address,Integer roomSum){
        return newhouseService.selectNew(minArea, maxArea, minPrice, maxPrice, address, roomSum);
    }

}
